import request from '@/utils/request';
let baseURL = '/portal-server/v1/api/receiptsReceived';
let arrearsURL = '/portal-server/v1/api/arrearsStatistics';
let bondURL = '/portal-server/v1/api/deposit';

/**
 * 实收主列表
 */
export const getReceiptsReceivedProjectListApi = data => {
	return request({
		url: `${baseURL}/receiptsReceivedProjectList`,
		method: 'post',
		data,
	});
};
/**
 * 实收明细
 */
export const getReceiptsReceivedContractsListApi = data => {
	return request({
		url: `${baseURL}/receiptsReceivedContractsList`,
		method: 'post',
		data,
	});
};
/**
 * 实收项目明细
 */
export const getReceiptsReceivedBillListApi = data => {
	return request({
		url: `${baseURL}/receiptsReceivedBillList`,
		method: 'post',
		data,
	});
};

/**
 * 实收明细项目级导出
 */
export const getContractsExportApi = params => {
	return request({
		url: `${baseURL}/contractsExport`,
		method: 'post',
		data: params,
		responseType: 'blob',
	});
};
/**
 * 实收账单明细导出
 */
export const getBillExportApi = params => {
	return request({
		url: `${baseURL}/billExport`,
		method: 'post',
		data: params,
		responseType: 'blob',
	});
};

/**
 * 欠款项目列表
 */
export const getArrearsStatisticsListProjectListApi = data => {
	return request({
		url: `/portal-server/v1/api/arrearsBusiness/queryProjectList`,
		method: 'post',
		data,
	});
};

/**
 * 欠款项目列表导出
 */
export const getArrearsProjectExportApi = params => {
	return request({
		url: `/portal-server/v1/api/arrearsBusiness/projectExport`,
		method: 'post',
		data: params,
		responseType: 'blob',
	});
};

/**
 * 欠款明细项目级导出
 */
export const getArrearsContractsExportApi = params => {
	return request({
		url: `${arrearsURL}/contractsExport`,
		method: 'post',
		data: params,
		responseType: 'blob',
	});
};
/**
 * 欠款账单明细导出
 */
export const getArrearsBillExportApi = params => {
	return request({
		url: `${arrearsURL}/billExport`,
		method: 'post',
		data: params,
		responseType: 'blob',
	});
};

/**
 * 保证金项目列表
 */
export const getDepositListApi = data => {
	return request({
		url: `${bondURL}/depositList`,
		method: 'post',
		data,
	});
};

/**
 * 保证金项目合同列表
 */
export const getDepositContractsListApi = data => {
	return request({
		url: `${bondURL}/depositContractsList`,
		method: 'post',
		data,
	});
};

/**
 * 保证金账单列表
 */
export const getDepositBillListApi = data => {
	return request({
		url: `${bondURL}/depositBillList`,
		method: 'post',
		data,
	});
};

/**
 * 保证金合同明细导出
 */
export const getProjectExportApi = params => {
	return request({
		url: `${bondURL}/projectExport`,
		method: 'post',
		data: params,
		responseType: 'blob',
	});
};
/**
 * 保证金合同明细导出
 */
export const getBondContractsExportApi = params => {
	return request({
		url: `${bondURL}/contractsExport`,
		method: 'post',
		data: params,
		responseType: 'blob',
	});
};

/**
 * 保证金账单明细导出
 */
export const getBondBillExportApi = params => {
	return request({
		url: `${bondURL}/billExport`,
		method: 'post',
		data: params,
		responseType: 'blob',
	});
};
